< previous page page_346 next page >

Page 346
LISTING 15.1.CONTINUED
9f8044bafea36a1f728739c0bb58ef4c.gif
32:     Set theDeposit = New Deposit
33: End Sub
34: Public Sub processDeposit()
35:     On Error GoTo processDepositErr
36:     'your code goes here...
37:     If theSomeWorkgroupProxy.CurrProcess.isCurrTaskComplete Then
38:         theApplication.theAppTransactions.addTrans2MemLog Deposited  funds
39:         theTransactionProcessor.theTransaction.TellerID =  theUser.UserID
40:         theTransactionProcessor.theTransaction.TransID = depositFunds
41:          theTransactionProcessor.theTransaction.DateTimeStamp = Now
42:         TransactionGroup.Add theTransactionProcessor.theTransaction.  TellerID, _
43:             theTransactionProcessor.theTransaction.TransID, _
44:             theTransactionProcessor.theTransaction.DateTimeStamp
45:         Set theCashDepositRecord = New CashDepositRecord
46:         Set theDeposit = New Deposit
47:         theDeposit.AccountID = theForm.txtDeposit(eDeposit.AccountID)
48:         theDeposit.Amount = theForm.txtDeposit(eDeposit.Amount)
49:         theCashDepositRecord.exceedsLimit theDeposit
50:     End If
51:     Exit Sub
52: processDepositErr:
53:     'Call RaiseError(MyUnhandledError, DepositFunds:deposit Method)
54:     theErrorHandler.handleErrors Err
55: End Sub
56: 'The ErrorHandler class
57: Private Enum eBusinessRuleViolations
58:     DepositLimitExceed = 1010
59: End Enum
60: Public Sub handleErrors(argErrObject As Object, _
61: Optional argMethodName As String, Optional argMsg As Integer)
62:     Set mvarCurrErrObject = argErrObject
63:     If Not IsMissing(argMethodName) Then
64:         msMethodName = argMethodName
65:     End If
66:     'handleDBErrors
67:     handleFileErrors
68:     handleGUIErrors
69:     handleMathErrors
70:     handleNetworkErros
71:     handlePrintErrors
72:     If Not IsMissing(argMsg) Then
73:         enforceBusinessRules argMsg
74:     End If
75:     handleUnknownErrors
76: End Sub
77: Private Sub enforceBusinessRules(argMsg As Integer)
continues

 
< previous page page_346 next page >

If you like this book, buy it!